import { createStore } from 'redux'
let initState = {
    list: []
}
function reducer(state = initState, action) {
    state = JSON.parse(JSON.stringify(state))
    switch (action.type) {
        case 'GET_DATA':
            state.list = action.list  //传过来的数据处理后保存到state里
            return state
        default:
            return state;
    }
}
const store = createStore(reducer)
export default store